<template>
  <div>
    <!-- <svg-icon name="home" color="pink" width="100px" height="100px"></svg-icon> -->
    <!-- <h1>test code</h1> -->
    <!-- <el-icon>
      <Edit />
    </el-icon> -->
    <router-view></router-view>
  </div>
</template>

<script setup lang="ts">
// 引入图标组件
// import { Plus, Edit, Delete } from '@element-plus/icons-vue'
// import Test from '@/components/Test.vue'
// import request from '@/utils/request'
// 引入组合式API函数
import { onMounted } from 'vue'
import { reqLogin } from './api/user'

// 当组件挂载完毕测试发一个请求
// onMounted(() => {
//   request({
//     url: '/user/login',
//     method: 'post',
//     data: {
//       username: 'admin',
//       password: '111111',
//     },
//   }).then((res) => {
//     console.log(res)
//   })
// })

onMounted(() => {
  reqLogin({ username: 'admin', password: '111111' })
})
</script>

<style scoped lang="scss">
div {
  h1 {
    color: $base-color;
  }
}
</style>
